Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added test script for ensuring docs are up to date. #672

Merged
merged 7 commits into from
Apr 7, 2021
Merged

Added test script for ensuring docs are up to date. #672

merged 7 commits into from
Apr 7, 2021

Conversation

UebelAndre
Copy link
Collaborator

@UebelAndre UebelAndre commented Mar 31, 2021

Users should now see an error in their builds when they make a change which invalidates docs
Screen Shot 2021-03-31 at 11 52 59 AM

Additionally, I've regenerated docs since they were out of date and fixed a bug in how docs were generated so we can correctly maintain indentations where desired.

Also I deleted the macos docs test since platform should have no impact on generating docs. This is purely a test of stardoc and the visibility of the bzl files which is platform agnostic.

@google-cla google-cla bot added the cla: yes label Mar 31, 2021
@UebelAndre UebelAndre marked this pull request as ready for review March 31, 2021 18:55
@UebelAndre
Copy link
Collaborator Author

@hlopko Do you have a second to review this PR?

@UebelAndre UebelAndre requested a review from hlopko April 2, 2021 17:10
Copy link
Member

@hlopko hlopko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, only nits. Thank you!

docs/test_docs.sh Outdated Show resolved Hide resolved

_common_attrs = {
"aliases": attr.label_keyed_string_dict(
doc = _tidy("""
doc = _tidy("""\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not skip the first line if empty in _tidyand not require ? It seems fragile to remember to put \ there.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added support for ignoring first lines.

@UebelAndre UebelAndre merged commit 1c3907d into bazelbuild:main Apr 7, 2021
@UebelAndre UebelAndre deleted the docs branch April 7, 2021 15:46
yagehu pushed a commit to yagehu/rules_rust that referenced this pull request Apr 23, 2021
* Added test script for ensuring docs are up to date.

* Fixed bug in doc attribute formatting.

* Regenerate documentation

* `_tidy` now ignores empty first lines

* Updated comment

* Regenerate documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants